import request from './request'

// 获取商家列表
export const getMerchantList = (params) => {
  return request({
    url: '/admin/merchants',
    method: 'get',
    params
  })
}

// 获取商家详情
export const getMerchantDetail = (id) => {
  return request({
    url: `/admin/merchants/${id}`,
    method: 'get'
  })
}

// 更新商家状态（营业中/休息中）
export const updateMerchantStatus = (id, status) => {
  return request({
    url: `/admin/merchants/${id}/status`,
    method: 'put',
    data: { status }
  })
}

// 删除商家
export const deleteMerchant = (id) => {
  return request({
    url: `/admin/merchants/${id}`,
    method: 'delete'
  })
}

